Skip to content

feat: use commit-check-action to check PR title#90

Draft
shenxianpeng wants to merge 2 commits into
mainfrom
feature/use-commit-check-action
Draft

feat: use commit-check-action to check PR title#90
shenxianpeng wants to merge 2 commits into
mainfrom
feature/use-commit-check-action

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jun 22, 2026

Copy link
Copy Markdown
Member

I've been maintaining commit-check for about 4 years now. It's mature enough to use the commit-check-action in their CI.

This PR eats my own dog food :)

What changed

Before: The check-pr-title job in pre-commit.yml installed a full Rust toolchain (rustup, cargo-binstall, committed) just to validate one PR title.

After: Uses commit-check-action with pr-title: true. The action discovers .github/commit-check.toml automatically — no extra setup needed.

Also added commit-check.toml to mirror the rules we had in committed.toml.

Diff

  • Rust toolchain setup gone (removed ~15 lines)
  • Two checkouts → one checkout (action auto-discovers config from .github/)
  • cspell spell check kept as a separate step
  • +27 -30 net

Not in this PR

  • The old .github/committed.toml is kept for now (can clean up later)
  • Other repos in the org that call this workflow may need their own commit-check.toml or use inherit_from — that's a follow-up

Replace the committed-based PR title check with our own
commit-check-action to eat our own dogfood.

- Remove Rust toolchain installation (rustup, cargo-binstall, committed)
- Add commit-check.toml config mirroring the existing committed.toml rules
- Simplify to a single checkout (action auto-discovers config in .github/)
- Keep cspell spell check as a separate step
Comment thread .github/workflows/pre-commit.yml Outdated
@shenxianpeng

shenxianpeng commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

This PR is not ready and still needs to think about how to make it work as expected.

I will come back when I have time.

@2bndy5

2bndy5 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Before: The check-pr-title job in pre-commit.yml installed a full Rust toolchain (rustup, cargo-binstall, committed)

We could have also just used pipx run committed ...; this was an oversight on my part.


My only main concern is adhering to conventional commits standards. This is because generating a changelog or release notes (via git-clff in cpp-linter-rs project) requires using a conventional commit title.

So, if

[commit]
# https://www.conventionalcommits.org
conventional_commits = true

means it enforces type(scope): title (where (scope) is optional), then I'm ok with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants